using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Multivariate
{
    /// <summary>
    /// <para>Create Signatures</para>
    /// <para>Creates an ASCII signature file of classes defined by input sample data and a set of raster bands.</para>
    /// <para>创建由输入样本数据和一组栅格波段定义的类的 ASCII 签名文件。</para>
    /// </summary>    
    [DisplayName("Create Signatures")]
    public class CreateSignatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateSignatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster_bands">
        /// <para>Input raster bands</para>
        /// <para><xdoc>
        ///   <para>The input raster bands for which to create the signatures.</para>
        ///   <para>They can be integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要为其创建特征的输入栅格波段。</para>
        ///   <para>它们可以是整数类型或浮点类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_sample_data">
        /// <para>Input raster or feature sample data</para>
        /// <para><xdoc>
        ///   <para>The input delineating the set of class samples.</para>
        ///   <para>The input can be an integer raster or a feature dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>描述类样本集的输入。</para>
        ///   <para>输入可以是整数栅格或要素数据集。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_signature_file">
        /// <para>Output signature file</para>
        /// <para><xdoc>
        ///   <para>The output signature file.</para>
        ///   <para>A .gsg extension must be specified.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出签名文件。</para>
        ///   <para>必须指定 .gsg 扩展名。</para>
        /// </xdoc></para>
        /// </param>
        public CreateSignatures(List<object> _in_raster_bands, object _in_sample_data, object _out_signature_file)
        {
            this._in_raster_bands = _in_raster_bands;
            this._in_sample_data = _in_sample_data;
            this._out_signature_file = _out_signature_file;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Create Signatures";

        public override string CallName => "sa.CreateSignatures";

        public override List<string> AcceptEnvironments => ["cellSize", "cellSizeProjectionMethod", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_raster_bands, _in_sample_data, _out_signature_file, _compute_covariance.GetGPValue(), _sample_field];

        /// <summary>
        /// <para>Input raster bands</para>
        /// <para><xdoc>
        ///   <para>The input raster bands for which to create the signatures.</para>
        ///   <para>They can be integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要为其创建特征的输入栅格波段。</para>
        ///   <para>它们可以是整数类型或浮点类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster bands")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_raster_bands { get; set; }


        /// <summary>
        /// <para>Input raster or feature sample data</para>
        /// <para><xdoc>
        ///   <para>The input delineating the set of class samples.</para>
        ///   <para>The input can be an integer raster or a feature dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>描述类样本集的输入。</para>
        ///   <para>输入可以是整数栅格或要素数据集。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature sample data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_sample_data { get; set; }


        /// <summary>
        /// <para>Output signature file</para>
        /// <para><xdoc>
        ///   <para>The output signature file.</para>
        ///   <para>A .gsg extension must be specified.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出签名文件。</para>
        ///   <para>必须指定 .gsg 扩展名。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output signature file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_signature_file { get; set; }


        /// <summary>
        /// <para>Compute covariance matrices</para>
        /// <para><xdoc>
        ///   <para>Specifies whether covariance matrices in addition to the means are calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Both the covariance matrices and the means for all classes of the input sample data will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Only the means for all classes of the input sample data will be calculated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否计算除均值之外的协方差矩阵。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算输入样本数据所有类别的协方差矩阵和均值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—仅计算输入样本数据的所有类别的均值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute covariance matrices")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_covariance_value _compute_covariance { get; set; } = _compute_covariance_value._true;

        public enum _compute_covariance_value
        {
            /// <summary>
            /// <para>COVARIANCE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COVARIANCE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MEAN_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MEAN_ONLY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Sample field</para>
        /// <para><xdoc>
        ///   <para>Field of the input raster or feature sample data to assign values to the sampled locations (classes).</para>
        ///   <para>Only integer or string fields are valid fields. The specified number or string will be used as the Class name in the output signature file.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入栅格或要素样本数据的字段，用于为采样位置（类）分配值。</para>
        ///   <para>只有整数或字符串字段是有效字段。指定的数字或字符串将用作输出签名文件中的类名。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sample field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sample_field { get; set; } = null;


        public CreateSignatures SetEnv(object cellSize = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}